<template>
  <div>
    <div><i class="el-icon-star-on"></i>基础信息</div>
    <r-list
      :ColsNum="5"
      :width="120"
      :ListCols="ListCols"
      ListType="Info"
      :ListData="ListData"
    ></r-list>
  </div>
</template>
<script>
export default {
  data() {
    return {
      //基础信息
      ListCols: [
        [
          {
            label: "Order Nnumber",
            prop: "orderNo"
          },
          {
            label: "订单Status",
            prop: "state",
            formatter: e =>
              e.state == 26
                ? "RechargeFailure"
                : e.state == 27
                ? "RechargeSuccess"
                : ""
          },
          {
            label: "IC卡号",
            prop: "cardNumber"
          },
          {
            label: "Recharge方式",
            prop: "channel",
            formatter: e =>
              e.channel == 0
                ? "RechargeFailure"
                : e.channel == 1
                ? "RechargeSuccess"
                : e.channel == 2
                ? "系统Recharge"
                : ""
          },
          {
            label: "Payment方式",
            prop: "payType",
            formatter: e =>
              e.payType == 0
                ? "未知"
                : e.payType == 1
                ? "WeChat"
                : e.payType == 2
                ? "Alipay"
                : e.payType == 3
                ? "现金"
                : ""
          },
          {
            label: "Recharge Amount",
            prop: "topupMoney"
          },
          {
            label: "Payment时间",
            prop: "topupTime"
          },
          {
            label: "Device Number",
            prop: "equipmentNo"
          }
        ]
      ],
      ListData: {}
    };
  },
  components: {},
  computed: {},
  mounted() {
    this.init();
  },
  methods: {
    async init() {
      let res = await this.api.icTopupinfo({
        id: this.$route.query.id
      });
      this.ListData = res.data;
    }
    // showFrom() {
    //     this.$prompt(`Please Input退款Money(PaymentMoney:${this.ListData.payMoney})`, 'Hint', {
    //         confirmButtonText: 'Confirm',
    //         cancelButtonText: 'Cancel', cancelButtonClass: 'bg_danger',
    //         // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
    //         // inputErrorMessage: '邮箱格式不正确'
    //     }).then(({ value }) => {
    //         this.$message({
    //             type: 'success',
    //             message: '退款Success'
    //         });
    //     }).catch(() => {
    //         this.$message({
    //             type: 'info',
    //             message: 'Cancel输入'
    //         });
    //     });

    // }
  }
};
</script>
<style scoped lang="scss"></style>
